<%@ page language="java" import="java.util.*,ms.platform.system.model.*"
	pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>
<!DOCTYPE html>
<html>
<head>
<title>部品详细</title>
<base href="<%=basePath%>">
<jsp:include page="../../jsp/public.jsp" flush="true"/>

<script type="text/javascript" src="<%=basePath%>js/plan/view.js"></script>
</head>
<body>
	<div class="index-bg" style = "height:50%">
    <div class="container container-reset">
        
        <div class="row">
            
            <div class="col-lg-12">
                <div class="index-nav-right">
                    <div class="index-nav-right-header"><span>当前位置>金型计划明细</span></div>
                </div>

                <div class="add-one-right">
                    <!--进度条S-->
                    <div class="progress-con">
                        <div class="progress-step">
                            <div class="progress-step-one">
                                <span class="step-line step-line-right step-line-gray step-line-green"></span>
                                <span class="step-circle step-line-green">
                                    <i>1</i>
                                </span>
                                <span class="step-line step-line-left step-line-green"></span>
                            </div>
                            <div class="progress-step-two">
                                <span>部品信息</span>
                            </div>
                        </div>
                        <div class="progress-step">
                            <div class="progress-step-one">
                                <span class="step-line step-line-right step-line-gray"></span>
                                <span class="step-circle step-line-gray">
                                    <i>2</i>
                                </span>
                                <span class="step-line step-line-left step-line-gray"></span>
                            </div>
                            <div class="progress-step-two">
                                <span>计划信息</span>
                            </div>
                        </div>
                       
                    </div>
                    <!--进度条E-->

                    <!--表单信息输入-->
                    <!--表单信息输入第一步-->
                    <input type="hidden" name="modelId" id= "modelId" value="${model.id }">
                    <div class="addInfo-one" id="departmentId">
                        <div class="row add-one-form-rowHeight">
                            <div class="form-group col-lg-5 col-lg-offset-1">
                                <label class="  control-label add-one-form-label">部品番号:</label>
                                <span>${model.modelCode }</span>
                            </div>
                            <div class="form-group col-lg-5">
                                <label class=" control-label add-one-form-label">设变号:</label>
                               	<span>${model.changeNo }</span>
                            </div>
                            <%-- <div class="form-group col-lg-5 ">
                                <label class=" control-label add-one-form-label">工程:</label>
                               	<span>${model.engineering }</span>
                            </div> --%>
                        </div>
                        <div class="row add-one-form-rowHeight">
                            <div class="form-group col-lg-5 col-lg-offset-1">
                                <label class=" control-label add-one-form-label">机种:</label>
                               	<span>${model.modelType }</span>
                            </div>
                            <div class="form-group col-lg-5">
                                <label class=" control-label add-one-form-label">量产设备(BL):</label>
                                <span>${model.modelBl }</span>
                            </div>
                        </div>
                        <div class="row add-one-form-rowHeight">
                            <div class="form-group col-lg-5 col-lg-offset-1">
                                <label class=" control-label add-one-form-label">部品难易度:</label>
                                <span>${model.modelLevel }</span>
                            </div>
                            <div class="form-group col-lg-5">
                                <label class=" control-label add-one-form-label">机床信息(PR):</label>
                                <span>${model.modelPr }</span>
                            </div>
                        </div>
                        <div class="row add-one-form-rowHeight">
                            <div class="form-group col-lg-5 col-lg-offset-1">
                                <label class=" control-label add-one-form-label">板厚:</label>
                                <span>${model.modelPly }</span>
                            </div>
                            <div class="form-group col-lg-5">
                                <label class=" control-label add-one-form-label">所属客户:</label>
                                <span>${model.customer }</span>
                            </div>
                        </div>
                        <div class="row add-one-form-rowHeight">
                            <div class="form-group col-lg-5 col-lg-offset-1">
                                <label class=" control-label add-one-form-label">材质:</label>
                               	<span>${model.modelTexture }</span>
                            </div>
                        </div>
                        <div class="row add-one-form-rowHeight">
                            <div class="col-lg-1 col-lg-offset-2">
                                <button type="button" class="btn navbar-default" onclick="nextOne()">下一页</button>
                            </div>
                        </div>
                    </div>
                    <!--表单信息输入第一步E-->
                    <!--表单信息输入第二步-->
                    <input type = "text" hidden = "true" id="modelPlanId" value = "${model.modelPlanId }"/>
                    <div class="addInfo-two" id="planId" hidden = "true">
                        <div class="row addInfo-two-search clearFix">
                            <div>
                                <label>部品番号:</label>
                                <span>${model.modelCode }</span>
                            </div>
                            <div>
                                <label>厂家:</label>
                                <span><c:if test="${not empty factory}">
													<c:forEach items="${factory }" var="factory" varStatus="m">
														 <c:if test="${model.factory == factory.orgCode}">${factory.orgName}</c:if>
													</c:forEach>
												</c:if></span>
                            </div>
                            <%-- <div>
                                <label>类别:<span class = "font-red">*</span>:</label>
                                <span>${model.type == '1'?'一次型':'二次型'}</span>
                            </div> --%>
                            <div>
                                <label>计划开始:</label>
                                <span>${model.planStartTimeText }</span>
                            </div>
                            <div>
                                <label>计划完成:</label>
                                <span>${model.planEndTimeText }</span>
                            </div>
                            <div>
                                <label style = "width:70px;">总工时(天):</label>
                                <span>${ model.planTotalTime}</span>
                            </div>
                        </div>
                        <div class="row addInfo-two-table">
                            <table class="table table-striped" id = "process_model">
                                <thead>
                                <tr class="table-thead">
                                    		<td>工序名称</td>
											<td>参考耗时(天)</td>
											<td>预计耗时</td>
											<td>单位</td>
											<td>工序开始</td>
											<td>工序结束</td>
											<td>精度(%)</td>
                                </tr>
                                </thead>
                                <tbody>
                                <c:if test="${not empty process}">
										<c:forEach items="${process }" var="pro" varStatus="r">
											<tr id="${pro.id }">	
												<td>${pro.processName }</td>
												<td>${pro.refTime }</td>
												<td>${pro.planTotalTime }</td>
												<td><span>天</span>
												</td>
												<td>${pro.planStartTimeText }</td>
												<td>${pro.planEndTimeText }</td>
												<td>${pro.targetPre == ''?0:pro.targetPre }</td>
											</tr>
										</c:forEach>
									</c:if>
                                </tbody>
                            </table>
                        </div>
                        <div class="add-one-form-rowHeight add-one-form-button">
                            <div class="">
                                <button type="button" class="btn navbar-default" onclick="previousStep()">上一页</button>
                            </div>
                            <div class="">
                                <button type="button" class="btn navbar-default" onclick="goBack()">返回</button>
                            </div>
                        </div>
                    </div>
                    <!--表单信息输入第二步E-->
                    <!--表单信息输入第三步-->
                    <div class="addInfo-three" id = "materials" hidden = "true">
                        <div class="row">
                            <input type = "text" hidden = "true" id="meterId" value = ""/>
                            <div class="row" id = "meterInfoList">
                                <div class="row addInfo-two-table">
                                    <table class="table table-striped"  id= "meterTabInfoList" style = "width:1000px;">
                                        <thead>
                                        <tr class="table-thead">
                                            <th>部品番号</th>
                                            <th>用途</th>
                                            <th>长</th>
                                            <th>幅</th>
                                            <th>板厚</th>
                                            <th>计划枚数</th>
                                            <th>每枚可取数</th>
                                            <th>可取台数</th>
                                            <th>下发时间</th>
                                            <th>下发人</th>
                                        </tr>
                                        </thead>
                                        <tbody>
                                        	<c:if test="${not empty meter}">
										<c:forEach items="${meter }" var="meter" varStatus="m">
											<tr id = "${meter.id }">	
												<td>${meter.modelCode }</td>
												<td>${meter.useFor }</td>
												<td>${meter.grow }</td>
												<td>${meter.wide }</td>
												<td>${meter.tall }</td>
												<td>${meter.planNum }</td>
												<td>${meter.perNum }</td>
												<td>${meter.planAmount }</td>
												<td>${meter.giveTimeText }</td>
												<td>${meter.operator }</td>
											</tr>
										</c:forEach>
									</c:if>
                                        </tbody>
                                    </table>
                                </div>
                            </div>
                            
                            <div class="add-one-form-rowHeight add-one-form-button">
                                <div class="">
                                    <button type="button" class="btn navbar-default" onClick="previousStepTwo()">上一步</button>
                                </div>
                                <div class="">
                                    <button type="button" class="btn navbar-default" onClick="javascript:history.go(-1)">关闭</button>
                                </div>
                            </div>
                        </div>
                    </div>
                    <!--表单信息输入第三步E-->
                    <!--表单信息输入-->

                </div>
            </div>
        </div>
        
    </div>
    </div>
    	<input type = "text" hidden = "true" id = "mapfactory" value="${map['factory'] }"/>
        <input type="text" hidden = "true"  id="mapType" value="${map['modelType'] }"/>
        <input type="text" hidden = "true"  id="mapLevel" value="${map['modelLevel'] }"/>
        <input type="text" hidden = "true"  id="mapEngineering" value="${map['engineering'] }"/>
        <input type = "text" hidden = "true" id = "mapCode" value="${map['modelCode'] }"/>
        <input type = "text" hidden = "true" id = "mapStatus" value="${map['planStatus'] }"/>
        <input type = "text" hidden = "true" id = "mapPage" value="${map['mapPage'] }"/>
</body>

</html>